Completed
Branch master (680841)
by Antoine
54s
created

module.exports   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
module.exports = function (shipit) {
2
    require('shipit-deploy')(shipit);
3
    require('shipit-submodule')(shipit);
4
5
    shipit.initConfig({
6
        default: {
7
            workspace: '/tmp/flask-api-starter-kit',
8
            repositoryUrl: '[email protected]:antkahn/flask-api-starter-kit.git',
9
            serviceName: 'application',
10
            hasDatabase: true,
11
            ignores: ['.git', 'node_modules'],
12
            shallowClone: true,
13
            submodules: true,
14
            keepReleases: 3
15
        },
16
        prod: {
17
            servers: [{
18
                host: 'my-first-host.com',
19
                user: 'api'
20
            }, {
21
                host: 'my-first-host.com',
22
                user: 'api'
23
            }],
24
            branch: 'prod',
25
            deployTo: '/my/path/on/server/flask-api-starter-kit',
26
        }
27
    });
28
29
    shipit.on('published', function() {
30
        return shipit.start('install');
31
    });
32
33
    if(shipit.environment.indexOf(['prod'])) {
34
      require('./devops/deploy/prod.js')(shipit);
35
    } else {
36
      console.log("Unknwown environment: " + shipit.environment);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
37
      exit(1);
38
    }
39
};
40